const { contextBridge, ipcRenderer } = require('electron')


exports.initPreload = function () {
    contextBridge.exposeInMainWorld('appBridge', {
        baseService: {
            search: (request) => {
                return ipcRenderer.sendSync('baseService.search', request)
            },
            runPlugin: (request) => {
                return ipcRenderer.sendSync('baseService.runPlugin', request)
            },
            runSysPluginByName: (request) => {
                return ipcRenderer.send('baseService.runSysPluginByName', request)
            },
            switchHide: (request) => {
                ipcRenderer.send('baseService.switchHide', request)
            },

        }
    })
}


